cmake_minimum_required(VERSION 3.8)
project(pose_solver)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_auto REQUIRED)
find_package(message_filters REQUIRED)
find_package(rclcpp REQUIRED)
find_package(libbase REQUIRED)
find_package(base_interfaces REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)

include_directories(
  ${CMAKE_CURRENT_LIST_DIR}/include
)

add_executable(pose_solver ./src/pose_solver.cpp)

ament_target_dependencies(pose_solver
      "rclcpp"
      "message_filters"
      "libbase"
      "base_interfaces"
      "tf2"
      "tf2_ros"
      "tf2_geometry_msgs"
)

install(DIRECTORY
  launch 
  config
  DESTINATION share/${PROJECT_NAME})

install(TARGETS
  pose_solver
  DESTINATION lib/${PROJECT_NAME}
)

ament_auto_package()
